//
//  WCAddressCell.m
//  WC
//
//  Created by 杨鑫 on 15/5/7.
//  Copyright (c) 2015年 智康. All rights reserved.
//

#import "WCAddressCell.h"

@implementation WCAddressCell

- (void)awakeFromNib {
    // Initialization code
    
    [self setSeparatorInset:UIEdgeInsetsZero];
    if ([self respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
        [self setPreservesSuperviewLayoutMargins:NO];
    }
    if ([self respondsToSelector:@selector(setLayoutMargins:)]) {
        [self setLayoutMargins:UIEdgeInsetsZero];
    }
//
    self.addressDetail.numberOfLines = 2;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)configModel:(WCNFasAddress *)address
{
    self.name.text =[NSString stringWithFormat:@"服务人:%@",address.name];
    self.phone.text =address.phone;
  
    if ([address.isDefault boolValue]) {
        self.isDefault.hidden =NO;
          self.addressDetail.text =[NSString stringWithFormat:@"(默认)服务地址:%@",address.address];
    }else{
        self.addressDetail.text =[NSString stringWithFormat:@"服务地址:%@",address.address];
        self.isDefault.hidden =YES;
    }
    
    
}
@end
